#########################################################
#                Maxim "verzhak" Akinin                 #
#              e-mail - <verzhak@gmail.com>             #
#########################################################

CC = gcc
DEBUG = -ggdb3 -pg
RELEASE = -O2 -Werror
COMMON = -Wall
OUTPUT_DIR = build
OUTPUT_RELEASE = build/netSwissKnife
OUTPUT_DEBUG = build/netSwissKnife_debug

all: clean
	mkdir $(OUTPUT_DIR)
	$(CC) $(COMMON) $(RELEASE) main.c operation.c error.c all.c tcp.c icmp.c -o $(OUTPUT_RELEASE)

debug: clean
	mkdir $(OUTPUT_DIR)
	$(CC) $(COMMON) $(DEBUG) main.c operation.c error.c all.c tcp.c icmp.c -o $(OUTPUT_DEBUG)

clean:
	rm -Rf $(OUTPUT_DIR) gmon.out

